package cn.benben.auth.controller;

import cn.benben.auth.dto.LoginDTO;
import cn.benben.auth.service.LoginService;
import cn.benben.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    public LoginService loginService;

    @PostMapping("login")
    public R<?> login(@RequestBody LoginDTO loginDTO){
        return R.ok(loginService.login(loginDTO));
    }
}
